import heapq

# 方法1: heappush添加
h = []
heapq.heappush(h, (5, "write code"))
heapq.heappush(h, (7, "release product"))
heapq.heappush(h, (1, "write spec"))
heapq.heappush(h, (3, "create tests"))

print(h)
print(f"min: {heapq.heappop(h)}")
""" 
[    (1, 'write spec'), 
(3, 'create tests'), (5, 'write code'),
(7, 'release product')]

min: (1, 'write spec')
"""
